package com.hangxiang.approval.exception;

import com.hangxiang.approval.enums.ResultStatusEnum;
import lombok.Data;

@Data
public class MyException extends RuntimeException {
    private int code;  //异常状态码
    private String message;  //异常信息

    public MyException( ResultStatusEnum resultStatusEnum) {
        this.code = resultStatusEnum.getCode();
        this.message = resultStatusEnum.getMessage();
    }

    public MyException() {

    }
}